using Microsoft.Data.SqlClient;
using System.Data;

namespace Lzfy_Refund_Service.Services
{
    public class VerifyDbConnectionFactory : IVerifyDbConnectionFactory
    {
        private readonly IDatabaseConfigurationService _databaseConfig;

        public VerifyDbConnectionFactory(IDatabaseConfigurationService databaseConfig)
        {
            _databaseConfig = databaseConfig;
        }

        public IDbConnection CreateConnection()
        {
            return new SqlConnection(_databaseConfig.GetDefaultConnection());
        }
    }
}